{% extends 'myadmin/index.html' %}

{% block title %}
<title>后台-管理组列表</title>
{% endblock %}

{% block con %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
               
                <div class="widget-body  am-fr">

                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a type="button" href="{% url 'auth_group_add' %}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</a>
                                </div>
                            </div>
                        </div>
                    </div>
                <!-- 搜索功能 -->
                <form>
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                        <div class="am-form-group tpl-table-list-select">
                            <select name="type" data-am-selected="{btnSize: 'sm'}" style="display: none;">
                              <option {% if request.GET.type == 'all' %} selected {% endif %} value="all">全部条件</option>
                              <option {% if request.GET.type == 'username' %} selected {% endif %} value="username">用户名</option>
                              <option {% if request.GET.type == 'email' %} selected {% endif %} value="email">邮箱</option>
                              <option {% if request.GET.type == 'phone' %} selected {% endif %} value="phone">手机号</option>
                              <option {% if request.GET.type == 'age' %} selected {% endif %} value="age">年龄</option>
                              <option {% if request.GET.type == 'sex' %} selected {% endif %} value="sex">性别</option>
                              <option {% if request.GET.type == 'status' %} selected {% endif %} value="status">状态</option>
                            </select>
                        </div>
                    </div>
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                        <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                            <input name="keywords" type="text" class="am-form-field" value="{{ request.GET.keywords }}">
                            <span class="am-input-group-btn">
                            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search"></button>
                            </span>
                        </div>
                    </div>
                </form>


                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>组名</th>
                                    
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {% for v in glist %}
                                <tr class="gradeX">
                                  
                                    <td class="am-text-middle">{{ v.name }}</td>
                                   
                                    <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <a href="{% url 'auth_group_edit' v.id %}">
                                                <i class="am-icon-pencil"></i> 编辑
                                            </a>
                                            <a href="#" class="tpl-table-black-operation-del">
                                                <i class="am-icon-trash"></i> 删除
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                            {% endfor %}
                             
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">

                        <div class="am-fr">
                            <ul class="am-pagination tpl-pagination">
                            
                          
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{% endblock %}